/**
 * Copyright (c) 2024,  科泰集团教研团队
 * 版权所有，请勿侵权
 */
package com.ktjiaoyu.service;

import com.ktjiaoyu.entity.SysUser;
import com.ktjiaoyu.utils.Page;

import java.util.List;

/**
 * @author 科泰集团教研团队
 * @version 1.0.0
 * @packageName com.ktjiaoyu.service
 * @fileName SysUserService.java
 * @createTime 2024/10/1 21:11
 * @lastModify 2024/10/1 21:11
 */
public interface SysUserService {
    //定义登录业务
    public SysUser login(String account, String password);
    //多条件查询用户分页数据
    public Page<SysUser> findPage(SysUser entity, Integer pageNo, Integer pageSize) throws Exception;
    /**
     * 查询用户列表
     */
    public List<SysUser> findList(SysUser sysUser);

    /**
     * 批量保持用户信息
     */
    public int saveBatch(List<SysUser> sysUserList);

    /**
     * 保存修改用户信息
     */
    public boolean saveOrUpdate(SysUser entity) throws Exception;

    /**
     *  根据id获取用户详细信息
     */
    public SysUser findById(Long id) throws Exception;

    //根据account获取用户详细信息
    public SysUser findByAccount(String srCode) throws Exception;

    //根据id删除用户信息
    public boolean deleteById(Long id) throws Exception;

    //修改密码
    public boolean validatePassword(Long userId,String oldPassword) throws Exception;

    boolean updatePassword(Long id, String newPassword);
}
